The requested content cannot be loaded.
Please try again later.
',
closeBtn: '").html(e).find(a.selector) : t(e) && (e.data("fancybox-placeholder") || e.data("fancybox-placeholder", f('
').insertAfter(e).hide()), e = e.show().detach(), a.wrap.bind("onReset", function () {
f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1)
}));
break;
case "image":
e = a.tpl.image.replace("{href}",
g);
break;
case "swf":
e = '
"
}
(!t(e) || !e.parent().is(a.inner)) && a.inner.append(e);
b.trigger("beforeShow");
a.inner.css("overflow", "yes" === k ? "scroll" :
"no" === k ? "hidden" : k);
b._setDimension();
b.reposition();
b.isOpen = !1;
b.coming = null;
b.bindEvents();
if (b.isOpened) {
if (d.prevMethod) b.transitions[d.prevMethod]()
} else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();
b.transitions[b.isOpened ? a.nextMethod : a.openMethod]();
b._preloadImages()
}
},
_setDimension: function () {
var a = b.getViewport(), d = 0, e = !1, c = !1, e = b.wrap, k = b.skin, g = b.inner, h = b.current,
c = h.width, j = h.height, m = h.minWidth, u = h.minHeight, n = h.maxWidth, p = h.maxHeight,
s = h.scrolling, q = h.scrollOutside ?
h.scrollbarWidth : 0, x = h.margin, y = l(x[1] + x[3]), r = l(x[0] + x[2]), v, z, t, C, A, F, B, D, H;
e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");
x = l(k.outerWidth(!0) - k.width());
v = l(k.outerHeight(!0) - k.height());
z = y + x;
t = r + v;
C = E(c) ? (a.w - z) * l(c) / 100 : c;
A = E(j) ? (a.h - t) * l(j) / 100 : j;
if ("iframe" === h.type) {
if (H = h.content, h.autoHeight && 1 === H.data("ready")) try {
H[0].contentWindow.document.location && (g.width(C).height(9999), F = H.contents().find("body"), q && F.css("overflow-x", "hidden"), A = F.outerHeight(!0))
} catch (G) {
}
} else if (h.autoWidth ||
h.autoHeight) g.addClass("fancybox-tmp"), h.autoWidth || g.width(C), h.autoHeight || g.height(A), h.autoWidth && (C = g.width()), h.autoHeight && (A = g.height()), g.removeClass("fancybox-tmp");
c = l(C);
j = l(A);
D = C / A;
m = l(E(m) ? l(m, "w") - z : m);
n = l(E(n) ? l(n, "w") - z : n);
u = l(E(u) ? l(u, "h") - t : u);
p = l(E(p) ? l(p, "h") - t : p);
F = n;
B = p;
h.fitToView && (n = Math.min(a.w - z, n), p = Math.min(a.h - t, p));
z = a.w - y;
r = a.h - r;
h.aspectRatio ? (c > n && (c = n, j = l(c / D)), j > p && (j = p, c = l(j * D)), c < m && (c = m, j = l(c / D)), j < u && (j = u, c = l(j * D))) : (c = Math.max(m, Math.min(c, n)), h.autoHeight &&
"iframe" !== h.type && (g.width(c), j = g.height()), j = Math.max(u, Math.min(j, p)));
if (h.fitToView) if (g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(), h.aspectRatio) for (; (a > z || y > r) && (c > m && j > u) && !(19 < d++);) j = Math.max(u, Math.min(p, j - 10)), c = l(j * D), c < m && (c = m, j = l(c / D)), c > n && (c = n, j = l(c / D)), g.width(c).height(j), e.width(c + x), a = e.width(), y = e.height(); else c = Math.max(m, Math.min(c, c - (a - z))), j = Math.max(u, Math.min(j, j - (y - r)));
q && ("auto" === s && j < A && c + x + q < z) && (c += q);
g.width(c).height(j);
e.width(c + x);
a = e.width();
y = e.height();
e = (a > z || y > r) && c > m && j > u;
c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A);
f.extend(h, {
dim: {width: w(a), height: w(y)},
origWidth: C,
origHeight: A,
canShrink: e,
canExpand: c,
wPadding: x,
hPadding: v,
wrapSpace: y - k.outerHeight(!0),
skinSpace: k.height() - j
});
!H && (h.autoHeight && j > u && j < p && !c) && g.height("auto")
},
_getPosition: function (a) {
var d = b.current, e = b.getViewport(), c = d.margin, f = b.wrap.width() + c[1] + c[3],
g = b.wrap.height() + c[0] + c[2], c = {position: "absolute", top: c[0], left: c[3]};
d.autoCenter && d.fixed &&
!a && g <= e.h && f <= e.w ? c.position = "fixed" : d.locked || (c.top += e.y, c.left += e.x);
c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio));
c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio));
return c
},
_afterZoomIn: function () {
var a = b.current;
a && (b.isOpen = b.isOpened = !0, b.wrap.css("overflow", "visible").addClass("fancybox-opened"), b.update(), (a.closeClick || a.nextClick && 1 < b.group.length) && b.inner.css("cursor", "pointer").bind("click.fb", function (d) {
!f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(),
b[a.closeClick ? "close" : "next"]())
}), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function (a) {
a.preventDefault();
b.close()
}), a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).bind("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).bind("click.fb", b.next)), b.trigger("afterShow"), !a.loop && a.index === a.group.length - 1 ? b.play(!1) : b.opts.autoPlay && !b.player.isActive && (b.opts.autoPlay = !1, b.play()))
},
_afterZoomOut: function (a) {
a =
a || b.current;
f(".fancybox-wrap").trigger("onReset").remove();
f.extend(b, {
group: {},
opts: {},
router: !1,
current: null,
isActive: !1,
isOpened: !1,
isOpen: !1,
isClosing: !1,
wrap: null,
skin: null,
outer: null,
inner: null
});
b.trigger("afterClose", a)
}
});
b.transitions = {
getOrigPosition: function () {
var a = b.current, d = a.element, e = a.orig, c = {}, f = 50, g = 50, h = a.hPadding, j = a.wPadding,
m = b.getViewport();
!e && (a.isDom && d.is(":visible")) && (e = d.find("img:first"), e.length || (e = d));
t(e) ? (c = e.offset(), e.is("img") && (f = e.outerWidth(), g = e.outerHeight())) :
(c.top = m.y + (m.h - g) * a.topRatio, c.left = m.x + (m.w - f) * a.leftRatio);
if ("fixed" === b.wrap.css("position") || a.locked) c.top -= m.y, c.left -= m.x;
return c = {
top: w(c.top - h * a.topRatio),
left: w(c.left - j * a.leftRatio),
width: w(f + j),
height: w(g + h)
}
}, step: function (a, d) {
var e, c, f = d.prop;
c = b.current;
var g = c.wrapSpace, h = c.skinSpace;
if ("width" === f || "height" === f) e = d.end === d.start ? 1 : (a - d.start) / (d.end - d.start), b.isClosing && (e = 1 - e), c = "width" === f ? c.wPadding : c.hPadding, c = a - c, b.skin[f](l("width" === f ? c : c - g * e)), b.inner[f](l("width" ===
f ? c : c - g * e - h * e))
}, zoomIn: function () {
var a = b.current, d = a.pos, e = a.openEffect, c = "elastic" === e, k = f.extend({opacity: 1}, d);
delete k.position;
c ? (d = this.getOrigPosition(), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1);
b.wrap.css(d).animate(k, {
duration: "none" === e ? 0 : a.openSpeed,
easing: a.openEasing,
step: c ? this.step : null,
complete: b._afterZoomIn
})
}, zoomOut: function () {
var a = b.current, d = a.closeEffect, e = "elastic" === d, c = {opacity: 0.1};
e && (c = this.getOrigPosition(), a.closeOpacity && (c.opacity = 0.1));
b.wrap.animate(c,
{
duration: "none" === d ? 0 : a.closeSpeed,
easing: a.closeEasing,
step: e ? this.step : null,
complete: b._afterZoomOut
})
}, changeIn: function () {
var a = b.current, d = a.nextEffect, e = a.pos, c = {opacity: 1}, f = b.direction, g;
e.opacity = 0.1;
"elastic" === d && (g = "down" === f || "up" === f ? "top" : "left", "down" === f || "right" === f ? (e[g] = w(l(e[g]) - 200), c[g] = "+=200px") : (e[g] = w(l(e[g]) + 200), c[g] = "-=200px"));
"none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, {
duration: a.nextSpeed,
easing: a.nextEasing,
complete: b._afterZoomIn
})
}, changeOut: function () {
var a =
b.previous, d = a.prevEffect, e = {opacity: 0.1}, c = b.direction;
"elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px");
a.wrap.animate(e, {
duration: "none" === d ? 0 : a.prevSpeed, easing: a.prevEasing, complete: function () {
f(this).trigger("onReset").remove()
}
})
}
};
b.helpers.overlay = {
defaults: {closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0},
overlay: null,
fixed: !1,
el: f("html"),
create: function (a) {
a = f.extend({}, this.defaults, a);
this.overlay && this.close();
this.overlay =
f('
').appendTo(b.coming ? b.coming.parent : a.parent);
this.fixed = !1;
a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0)
},
open: function (a) {
var d = this;
a = f.extend({}, this.defaults, a);
this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a);
this.fixed || (n.bind("resize.overlay", f.proxy(this.update, this)), this.update());
a.closeClick && this.overlay.bind("click.overlay", function (a) {
if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ?
b.close() : d.close(), !1
});
this.overlay.css(a.css).show()
},
close: function () {
var a, b;
n.unbind("resize.overlay");
this.el.hasClass("fancybox-lock") && (f(".fancybox-margin").removeClass("fancybox-margin"), a = n.scrollTop(), b = n.scrollLeft(), this.el.removeClass("fancybox-lock"), n.scrollTop(a).scrollLeft(b));
f(".fancybox-overlay").remove().hide();
f.extend(this, {overlay: null, fixed: !1})
},
update: function () {
var a = "100%", b;
this.overlay.width(a).height("100%");
I ? (b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth),
p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width());
this.overlay.width(a).height(p.height())
},
onReady: function (a, b) {
var e = this.overlay;
f(".fancybox-overlay").stop(!0, !0);
e || this.create(a);
a.locked && (this.fixed && b.fixed) && (e || (this.margin = p.height() > n.height() ? f("html").css("margin-right").replace("px", "") : !1), b.locked = this.overlay.append(b.wrap), b.fixed = !1);
!0 === a.showEarly && this.beforeShow.apply(this, arguments)
},
beforeShow: function (a, b) {
var e, c;
b.locked && (!1 !== this.margin && (f("*").filter(function () {
return "fixed" ===
f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap")
}).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), e = n.scrollTop(), c = n.scrollLeft(), this.el.addClass("fancybox-lock"), n.scrollTop(e).scrollLeft(c));
this.open(a)
},
onUpdate: function () {
this.fixed || this.update()
},
afterClose: function (a) {
this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this))
}
};
b.helpers.title = {
defaults: {type: "float", position: "bottom"}, beforeShow: function (a) {
var d =
b.current, e = d.title, c = a.type;
f.isFunction(e) && (e = e.call(d.element, d));
if (q(e) && "" !== f.trim(e)) {
d = f('
' + e + "
");
switch (c) {
case "inside":
c = b.skin;
break;
case "outside":
c = b.wrap;
break;
case "over":
c = b.inner;
break;
default:
c = b.skin, d.appendTo("body"), I && d.width(d.width()), d.wrapInner('
'), b.current.margin[2] += Math.abs(l(d.css("margin-bottom")))
}
d["top" === a.position ? "prependTo" : "appendTo"](c)
}
}
};
f.fn.fancybox = function (a) {
var d,
e = f(this), c = this.selector || "", k = function (g) {
var h = f(this).blur(), j = d, k, l;
!g.ctrlKey && (!g.altKey && !g.shiftKey && !g.metaKey) && !h.is(".fancybox-wrap") && (k = a.groupAttr || "data-fancybox-group", l = h.attr(k), l || (k = "rel", l = h.get(0)[k]), l && ("" !== l && "nofollow" !== l) && (h = c.length ? f(c) : e, h = h.filter("[" + k + '="' + l + '"]'), j = h.index(this)), a.index = j, !1 !== b.open(h, a) && g.preventDefault())
};
a = a || {};
d = a.index || 0;
!c || !1 === a.live ? e.unbind("click.fb-start").bind("click.fb-start", k) : p.undelegate(c, "click.fb-start").delegate(c +
":not('.fancybox-item, .fancybox-nav')", "click.fb-start", k);
this.filter("[data-fancybox-start=1]").trigger("click");
return this
};
p.ready(function () {
var a, d;
f.scrollbarWidth === v && (f.scrollbarWidth = function () {
var a = f('
').appendTo("body"),
b = a.children(), b = b.innerWidth() - b.height(99).innerWidth();
a.remove();
return b
});
if (f.support.fixedPosition === v) {
a = f.support;
d = f('
').appendTo("body");
var e = 20 ===
d[0].offsetTop || 15 === d[0].offsetTop;
d.remove();
a.fixedPosition = e
}
f.extend(b.defaults, {scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body")});
a = f(r).width();
J.addClass("fancybox-lock-test");
d = f(r).width();
J.removeClass("fancybox-lock-test");
f("").appendTo("head")
})
})(window, document, jQuery);
// source --> https://szafarnia.art.pl/wp-content/themes/szafarnia/js/lib/jquery.cookie.js?ver=2.7.1
/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD (Register as an anonymous module)
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch (e) {
}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {},
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
cookies = document.cookie ? document.cookie.split('; ') : [],
i = 0,
l = cookies.length;
for (; i < l; i++) {
var parts = cookies[i].split('='),
name = decode(parts.shift()),
cookie = parts.join('=');
if (key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, {expires: -1}));
return !$.cookie(key);
};
}));
// source --> https://szafarnia.art.pl/wp-content/themes/szafarnia/js/scripts.js?ver=1.0.0
jQuery(document).ready(function ($) {
$('.header .widget_search').before('
');
$('form.search').submit(function () {
if ($('form.search #s').val() == '') {
$('form.search #s').val(' ');
}
});
/*==================================
= menu fixer =
==================================*/
if ($('#menu-item-6261').hasClass('current-post-parent')) {
$('#menu-item-15').addClass('current-menu-item');
}
if ($('#menu-item-65').hasClass('current-post-parent')) {
$('#menu-item-15').addClass('current-menu-item');
}
if ($('#menu-item-170').hasClass('current-page-ancestor')) {
$('#menu-item-15').addClass('current-menu-item');
}
$('.category-396 .menu-item-193').addClass('current-menu-item');
$('ul .sub-menu li.current-post-ancestor').parents('li').addClass('current-menu-item');
/*----- End of menu fixer ------*/
// $('.calendar-archives').archivesCW();
customCalendarSlider();
$('.banner ul').bxSlider({
controls: false,
mode: 'fade',
auto: true,
pause: 5000,
speed: 400,
autoHover: true
});
viewOption();
has_tabs();
emptyPFixer();
accordionSc();
archiveGenerator();
booker_modal();
$('.page a').each(function () {
if (/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))) {
$(this).addClass('single_box_image');
}
;
});
$('.post a').each(function () {
if (/\.(?:jpg|jpeg|gif|png)$/i.test($(this).attr('href'))) {
$(this).addClass('single_box_image');
}
;
});
// $(".gallery").find('br').remove();
$(".gallery a").each(function () {
$(this).attr('rel', 'gal')
});
$(".gallery a").fancybox({
beforeShow: function () {
var alt = this.element.find('img').attr('alt');
this.inner.find('img').attr('alt', alt);
this.title = alt;
},
nextEffect: 'fade',
prevEffect: 'fade'
});
$(".single_box_image").fancybox({
beforeShow: function () {
var alt = this.element.find('img').attr('alt');
this.inner.find('img').attr('alt', alt);
this.title = alt;
},
nextEffect: 'fade',
prevEffect: 'fade',
helpers: {
title: {
type: 'inside'
}
}
});
$(".inauguracja a").fancybox({
beforeShow: function () {
var alt = this.element.find('img').attr('alt');
this.inner.find('img').attr('alt', alt);
this.title = alt;
},
nextEffect: 'fade',
prevEffect: 'fade',
helpers: {
title: {
type: 'inside'
}
}
});
var mobileTextMenu = $('.header .main_menu .nav>ul>li.current-menu-item > a').eq(0).text();
if (mobileTextMenu == '') {
var mobileTextMenu = $('.header .main_menu .nav>ul>li .current-menu-item > a').eq(0).text()
}
if (mobileTextMenu == '') {
var mobileTextMenu = $('.header .main_menu .nav>ul>li .current-page-ancestor > a').eq(0).text()
}
if (mobileTextMenu == '') {
var mobileTextMenu = $('.header .main_menu .nav>ul>li .current-post-ancestor > a').eq(0).text()
}
$('.mobilePart .mob span').html(mobileTextMenu);
$('.contest-history li:nth-child(3n)').after('
');
$('.widget_recent_entries li').each(function () {
var elem2 = $(this).find('.post-date');
var pd = elem2.html();
pd = pd.substring(0, pd.length - 6);
elem2.html(pd)
});
function customCalendarSlider() {
var naviPrev = $('.calendar-navigation').find('.prev-year');
var naviNext = $('.calendar-navigation').find('.next-year');
naviPrev.click(function () {
elName();
return false
});
naviNext.click(function () {
elName();
return false
});
function elName() {
var elNames = $('.menu-container .menu a.selected').attr('rel');
$('.calendar-archives .archives-years .year').hide();
$('.calendar-archives .archives-years .year[rel="' + elNames + '"]').show()
}
var el1 = $('.months .title');
var el2 = $('.months .menu a');
var title = el1.text();
var arr = [];
arr.push(title.split(' '));
el1.html(arr[0][0] + '
' + arr[0][1]);
el2.each(function (index, el) {
var title = $(el).text();
var arr = [];
arr.push(title.split(' '));
$(el).html(arr[0][0] + '
' + arr[0][1])
})
}
function viewOption() {
var list = $('#vopt');
var link = $('.view-options a');
link.click(function () {
if (!$(this).hasClass('active')) {
link.removeClass('active');
$(this).addClass('active');
list.fadeOut('200', function () {
list.toggleClass('list');
list.fadeIn(220)
})
}
;
return false
})
}
function has_tabs() {
var tabs_single = $('.tabs_single');
var tabs_header_item = $('.tabs_header li');
tabs_header_item.first().addClass('active');
tabs_header_item.click(function () {
var i = $(this).index();
if (!$(this).hasClass('active')) {
tabs_header_item.removeClass('active');
$(this).addClass('active');
tabs_single.hide();
tabs_single.eq(i).fadeIn(400)
}
return false
})
}
function emptyPFixer() {
$('.type-page p').each(function () {
if ($(this).html().length <= 0) {
$(this).hide()
}
})
}
function accordionSc() {
$('.acc_title').each(function () {
if ($(this).find('br').length > 0) $(this).addClass('high');
if ($(this).find('p').length > 0) $(this).addClass('high')
});
$('.acc_title').click(function () {
$(this).next().stop().slideToggle(300);
return false
})
}
function archiveGenerator() {
/*==========================================
= sort archive items =
==========================================*/
var ul = $(".archive-build");
var arr = $.makeArray(ul.children("li"));
arr.sort(function (a, b) {
var textA = +$(a).data('forsort');
var textB = +$(b).data('forsort');
if (textA < textB) return -1;
if (textA > textB) return 1;
return 0;
});
ul.empty();
$.each(arr, function () {
ul.append(this);
});
/*----- End of sort archive items ------*/
var years = [];
var months = [];
var monthNames = Array("styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień");
var elem = $('.archive-build li');
elem.each(function (index, el) {
var dataInfo = $(this).data('forarchive');
var splited = dataInfo.split(',');
years.push(splited[2])
});
years = years.filter(onlyUnique);
years.sort(function (a, b) {
return a - b
});
for (var i = years.length - 1; i >= 0; i--) {
$('.archiveOptions .years').append('
Archiwum ' + years[i] + '')
}
;
$('.archiveOptions .years li').eq(0).addClass('active');
$('.archiveOptions .years li').click(function () {
if (!$(this).hasClass('active')) {
$('.archiveOptions .years li').removeClass('active');
$(this).addClass('active');
filteryear($(this).data('year'))
}
;
return false
});
filteryear();
function filteryear(year) {
if (year == undefined) {
year = $('.archiveOptions .years li').eq(0).data('year')
}
$('.archive-build li').removeClass('active');
$('.archive-build li').each(function () {
var dataInfo = $(this).data('forarchive');
var splited = dataInfo.split(',');
if (year != parseInt(splited[2])) {
$(this).removeClass('active')
} else {
$(this).addClass('active');
months.push(splited[1])
}
});
months = months.filter(onlyUnique);
months.sort(function (a, b) {
return a - b
});
$('.archiveOptions .months').html('');
for (var i = 0; i < months.length; i++) {
$('.archiveOptions .months').append('
' + monthNames[months[i] - 1] + '')
}
;
$('.archiveOptions .months li').eq(0).addClass('active');
filtermonth(1, year);
months = []
}
$(document).on('click', '.archiveOptions .months li', function () {
if (!$(this).hasClass('active')) {
$('.archiveOptions .months li').removeClass('active');
$(this).addClass('active');
var thisMonth = $(this).data('month');
filtermonth(thisMonth, $('.years li.active').data('year'))
}
;
return false
});
function filtermonth(month, year) {
if (month == 'undefined') {
month = $('.archiveOptions .months li').eq(0).data('month')
}
$('.archive-build li').each(function () {
var dataInfo = $(this).data('forarchive');
var splited = dataInfo.split(',');
if (month == parseInt(splited[1]) && year == parseInt(splited[2])) {
$(this).addClass('active')
} else {
$(this).removeClass('active')
}
})
}
function onlyUnique(value, index, self) {
return self.indexOf(value) === index
}
}
function booker_modal() {
$(".various").fancybox({
fitToView: true,
width: '90%',
height: '90%',
autoSize: true,
closeClick: false,
openEffect: 'none',
closeEffect: 'none'
})
}
/*================================
= calendar =
================================*/
$('.has_event').click(function () {
var this_ids = $(this).data();
var home = $('table.events_calendar').data('uri');
var root = $('table.events_calendar').data('root');
if (this_ids['event']) {
//single event
var id_to = this_ids['event'].toString();
window.location = home + '?p=' + id_to;
} else {
//multiple events
var id_to = this_ids['events'].toString();
if (window.location.search.indexOf('date') > -1) {
console.log(window.location);
window.location = root + window.location.search + '&events_concerts=' + id_to;
} else {
// console.log(root);
// console.log('121212');
// console.log($('.events_calendar').data())
// return false;
window.location = root + '?events_concerts=' + id_to;
}
}
return false;
});
/*----- End of calendar ------*/
$('body#en .wysija-submit').val('Sign-up!')
$('body#en .x1').text('We invite you to subscribe to the newsletter.');
$('.a11y-responsive ul').append('
pokaz podkreslenia');
$('.a11y-responsive ul .toggle-fontsize .offscreen').after('
');
$('.line-links').on('click', function () {
console.log('line-links');
return false;
});
// LINK UNDERLINE
function setUnderline() {
underlineCookieVal = $('body').hasClass('underline') ? 'isActive' : 'notActive';
$.cookie('linkUnderline', underlineCookieVal, {
path: '/'
});
}
if ($.cookie('linkUnderline') == 'isActive') {
$('body').addClass('underline');
} else {
$('body').removeClass('underline');
}
$(".linkUnderline").on('click', function () {
console.log('dsdsd')
$('body').toggleClass('underline');
setUnderline();
return false;
});
});